package com.bwie.product.controller;

import com.bwie.common.core.domain.Result;
import com.bwie.product.domain.vo.MerchantSelectSkuListVo;
import com.bwie.product.service.ProductMerchantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("productMerchant")
@CrossOrigin
public class ProductMerchantController {
    /**
     * 注入
     */
    @Autowired
    private ProductMerchantService service;

    /**
     * 获取商户所拥有的sku
     * @return
     */
    @GetMapping("getSelectSkuList")
    public Result<List<MerchantSelectSkuListVo>> getSelectSkuList(){
        //调用方法
        List<MerchantSelectSkuListVo> list = service.getSelectSkuList();
        //返回
        return Result.success(list);
    }
}
